using System;
using System.Collections.Generic;
using System.ComponentModel;
using Microsoft.Ccr.Core;
using Microsoft.Dss.Core.Attributes;
using Microsoft.Dss.ServiceModel.Dssp;
using Microsoft.Dss.ServiceModel.DsspServiceBase;
using W3C.Soap;

namespace UrbanGPS
{
	public sealed class Contract
	{
		[DataMember]
		public const string Identifier = "http://schemas.tempuri.org/2008/09/urbangps.html";
	}
	
	[DataContract]
	public class UrbanGPSState
	{
        [DataMember]
        public double Latitude = 0;


        [DataMember]
        public string NS = "";

        [DataMember]
        public double Longitude = 0;

        [DataMember]
        public double Altitude = 0;

        [DataMember]
        public double YDiff = 0;

        [DataMember]
        public double XDiff = 0;
	}

    [DataContract]
    public class StartState
    {
    }
	
	[ServicePort]
    public class UrbanGPSOperations : PortSet<DsspDefaultLookup, DsspDefaultDrop, Subscribe, Connect, NotifyEvent>
	{
	}

    public class Connect : Update<StartState, PortSet<DefaultUpdateResponseType, Fault>>
    {
        public Connect()
        {
        }

        public Connect(StartState body)
            : base(body)
        {
        }
    }

    public class NotifyEvent : Replace<UrbanGPSState, PortSet<DefaultReplaceResponseType, Fault>>
    {
        public NotifyEvent()
        {
        }

        public NotifyEvent(UrbanGPSState body)
            : base(body)
        {
        }
    }

    public class Subscribe : Subscribe<SubscribeRequestType, PortSet<SubscribeResponseType, Fault>>
    {
    }
}


